// -*- go -*-
//
// Copyright (c) 2020 Markku Rossi
//
// All rights reserved.
//

package rsa

import (
	"math"
)

const (
	E65537 = 0x10001
)

// c = m**e mod n
func Encrypt(msg, e, n uint) uint {
	return math.Exp(msg, e, n)
}

// m = c**d mod n
func Decrypt(cipher, d, n uint) uint {
	return math.Exp(cipher, d, n)
}
